<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>gvn.cmdline</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">

<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="gvn-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://code.google.com/p/gvn/">Project&nbsp;Homepage</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <font size="-1"><b class="breadcrumbs">
        <a href="gvn-module.html">Package&nbsp;gvn</a> ::
        Module&nbsp;cmdline
      </b></font></br>
    </td>
    <td><table cellpadding="0" cellspacing="0">
      <tr><td align="right"><font size="-2">[show&nbsp;private&nbsp;|&nbsp;<a href="../public/gvn.cmdline-module.html">hide&nbsp;private</a>]</font></td></tr>
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="gvn.cmdline-module.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
    </table></td>
</tr></table>

<!-- =========== START OF MODULE DESCRIPTION =========== -->
<h2 class="module">Module gvn.cmdline</h2>

<p>Facilities for processing a command-line and dispatching 
subcommands</p>
<p>Classes: Option -- representation of an option OptionParser -- 
customized optparse.OptionParser Command -- representation of a 
subcommand</p>
<p>Variables: SvnOptions -- map of option names to Option objects for svn 
GvnOptions -- map of option names to Option objects for gvn CommandNames 
-- list of command names (no aliases) NameToCommand -- map of command 
names (including aliases) to Command objects</p>
<p>Functions: FindProject -- Find which project to use. AuthOptions -- 
Return the standard auth options. LogOptions -- Return the standard log 
options. AddCommand -- Add a new Command to the global list. 
RunSvnCommand -- Run an svn command. Run -- Run a subcommand. Notify -- 
notify callback main -- main function</p>
<p>Call AddCommand with a function implementing a subcommand and some 
metadata about it (see the Command class's documentation for details) for 
each subcommand. Call main with sys.argv; it uses OptionParser to parse 
the command-line arguments and Run to dispatch the subcommands.</p>
Run passes a Config object, an optparse.Values object, a list of 
subcommand name + operands, and a svn.core.Pool. Use the optparse.Values 
object to test for options. The operands are the non-option arguments 
from the command line, without interpretation.
<hr/>

<!-- =========== START OF CLASSES =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Classes</th></tr>
<tr><td width="15%">
  <b><a href="gvn.cmdline.Command-class.html"><code>Command</code></a></b></td>
  <td>&nbsp;</td></tr>
<tr><td width="15%">
  <b><a href="gvn.cmdline.Context-class.html"><code>Context</code></a></b></td>
  <td>Context for a command: Project, WorkingCopy, Pool, callbacks, ...</td></tr>
<tr><td width="15%">
  <b><a href="gvn.cmdline.Option-class.html"><code>Option</code></a></b></td>
  <td>&nbsp;</td></tr>
<tr><td width="15%">
  <b><a href="gvn.cmdline.OptionParser-class.html"><code>OptionParser</code></a></b></td>
  <td>&nbsp;</td></tr>
</table><br />


<!-- =========== START OF FUNCTION SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Function Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.cmdline-module.html#AddCommand" class="summary-sig-name"><code>AddCommand</code></a>(<span class=summary-sig-arg>name</span>,
          <span class="summary-sig-vararg">*args</span>,
          <span class="summary-sig-kwarg">**kwargs</span>)</span></code>
<br />
Add a new Command to the global list.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.cmdline-module.html#AuthOptions" class="summary-sig-name"><code>AuthOptions</code></a>(<span class=summary-sig-arg>options</span>)</span></code>
<br />
Return the standard auth options, appended to options if 
specified.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="Help"></a><span class="summary-sig"><span class="summary-sig-name">Help</span>(<span class=summary-sig-arg>operands</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.cmdline-module.html#LogOptions" class="summary-sig-name"><code>LogOptions</code></a>(<span class=summary-sig-arg>options</span>)</span></code>
<br />
Return the standard log options, appended to options if specified.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="main"></a><span class="summary-sig"><span class="summary-sig-name">main</span>(<span class=summary-sig-arg>argv</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.cmdline-module.html#Run" class="summary-sig-name"><code>Run</code></a>(<span class=summary-sig-arg>options</span>,
          <span class=summary-sig-arg>argv</span>)</span></code>
<br />
Run a subcommand.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.cmdline-module.html#RunSvnCommand" class="summary-sig-name"><code>RunSvnCommand</code></a>(<span class=summary-sig-arg>ctx</span>,
          <span class=summary-sig-arg>subcommand</span>,
          <span class=summary-sig-arg>operands</span>,
          <span class=summary-sig-arg>runner</span>)</span></code>
<br />
Run an svn command.</td></tr>
</table><br />


<!-- =========== START OF FUNCTION DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Function Details</th></tr>
</table>

<a name="AddCommand"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">AddCommand</span>(<span class=sig-arg>name</span>,
          <span class="sig-vararg">*args</span>,
          <span class="sig-kwarg">**kwargs</span>)</span>
  </h3>
  <p>Add a new Command to the global list.</p>
  <p>Arguments: name -- name of the new Command aliases -- optional list 
  of aliases for the Command</p>
  Any further arguments are passed to the Command constructor.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="AuthOptions"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">AuthOptions</span>(<span class=sig-arg>options</span>=<span class=sig-default>[]</span>)</span>
  </h3>
  Return the standard auth options, appended to options if 
  specified.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="LogOptions"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">LogOptions</span>(<span class=sig-arg>options</span>=<span class=sig-default>[]</span>)</span>
  </h3>
  Return the standard log options, appended to options if 
  specified.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="Run"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">Run</span>(<span class=sig-arg>options</span>,
          <span class=sig-arg>argv</span>)</span>
  </h3>
  <p>Run a subcommand.</p>
  Arguments: options -- options from OptionParser.parse_args argv -- 
  subcommand + operands
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="RunSvnCommand"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">RunSvnCommand</span>(<span class=sig-arg>ctx</span>,
          <span class=sig-arg>subcommand</span>,
          <span class=sig-arg>operands</span>,
          <span class=sig-arg>runner</span>=<span class=sig-default>&lt;function&nbsp;RunSvn&nbsp;at&nbsp;0xb745dcdc&gt;</span>)</span>
  </h3>
  <p>Run an svn command.</p>
  Arguments: ctx -- cmdline.Context object subcommand -- svn 
  subcommand to run operands -- operands from OptionParser.parse_args 
  runner -- for unit testing; ignore
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="gvn-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://code.google.com/p/gvn/">Project&nbsp;Homepage</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left"><font size="-2">Generated by Epydoc 2.1 on Tue Jul 17 16:51:46 2007</font></td>
    <td align="right"><a href="http://epydoc.sourceforge.net"
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
  </tr>
</table>
</body>
</html>
